package com.abe.libshare;

import android.app.Activity;

import com.umeng.socialize.ShareAction;
import com.umeng.socialize.UMShareListener;
import com.umeng.socialize.bean.SHARE_MEDIA;
import com.umeng.socialize.media.UMImage;
import com.umeng.socialize.media.UMWeb;

public class ShareUtils {

    public static void ShareWeb(Activity activity, int thumb_img, UMShareListener shareListener) {
        UMImage thumb = new UMImage(activity, thumb_img);
        UMWeb web = new UMWeb("http://abe_peng.gitee.io/jimuchenglin/");
        web.setThumb(thumb);
        web.setTitle("积木成林");
        web.setDescription("我的个人页面，欢迎访问");
        new ShareAction(activity).setDisplayList(SHARE_MEDIA.SINA).withMedia(web).setCallback(shareListener).open();

    }
}
